<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>视频播放</title>
		<link rel="stylesheet" href="../utils/layui/css/layui.css">
		    <style>
		    	   body{
		    	   	background: #f2f2f2;
		    	   }
		    	   .video{
		    	   	display: block;
		    	   	width: 100%;
		    	   	height: auto;
		    	   }
		    	   .margin15{
		    	   	margin: 15px;
		    	   }
		    </style>

	</head>
	<body>
		<div class="layui-container" >
			<div class="layui-row layui-col-space15 margin15">
				<section class="layui-card">
					<div class="layui-card-body">
						<div class="video" id="video" data-url="http://img.ksbbs.com/asset/Mon_1703/05cacb4e02f9d9e.mp4" style="width: 100%;"></div>
					</div>
				</section>
			</div>
		</div>
		<script src="/admin/utils/layui/layui.js" charset="utf-8"></script>
		<script src="/admin/utils/layui/config.js" charset="utf-8"></script>
		<script>
			layui.use(['ckplayer', 'helper'], function () {
				var $ = layui.$,
					ckplayer = layui.ckplayer;
					
				if(isset($_GET['url']) == false){
					$_GET['url'] = parent.window.selectObj.data.url;
				}	
				var filename = $_GET['url'];
				var index = filename.lastIndexOf(".");
				var suffix = filename.substr(index+1);	
				var vUrl = $_GET['url'],
					videoObject = {
					container: '#video',
					loop: true,
					autoplay: true,
					video: [
						[vUrl, 'video/'+suffix]
					]
				};
				var player = new ckplayer(videoObject);

			});
		</script>
	</body>
</html>
